{"version":3,"sources":["webpack:///./src/views/hot_products.vue?26d8","webpack:///./src/views/hot_products.vue","webpack:///./src/components/ProductSkeleton.vue","webpack:///./src/components/ProductSkeleton.vue?44ac","webpack:///./src/views/hot_products.vue?26e6","webpack:///./src/components/ProductSkeleton.vue?c27f"],"names":["_hoisted_1","class","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","key","_hoisted_6","_defineComponent","__name","setup","__props","route","useRoute","ProductList","ref","types","name","id","changeType","typeId","value","pageNum","noMore","window","scrollTo","top","GetTop100","pageSize","HotsLoding","Api","page","pagesize","cid","then","res","_res$Goods","_res$Goods2","Goods","length","concat","onMounted","_route$query","query","_ctx","_cache","_component_el_affix","_resolveComponent","_component_el_button","_openBlock","_createElementBlock","_createVNode","offset","default","_withCtx","_createElementVNode","_Fragment","_renderList","type","onClick","$event","_normalizeClass","selectType","_toDisplayString","$t","_","_createCommentVNode","i","ProductSkeleton","Product","index","_createBlock","CommodityCard","data","height","placeholder","_createTextVNode","__exports__","_component_el_skeleton","loading","animated","template","_component_el_skeleton_item","variant","script","render"],"mappings":"yLAGA,MACMA,EAAa,CAAEC,MAAO,aACtBC,EAAa,CAAED,MAAO,SACtBE,EAAa,CAAC,WACdC,EAAa,CAAEH,MAAO,WACtBI,EAAa,CACjBC,IAAK,EACLL,MAAO,eAEHM,EAAa,CACjBD,IAAK,EACLL,MAAO,UAUmBO,mCAAiB,CAC3CC,OAAQ,eACRC,MAAMC,GAER,MAAMC,EAAQC,iBACRC,EAAcC,iBAAI,MAClBC,EAAQ,CACZ,CAAEC,KAAM,KAAMC,GAAI,MAClB,CAAED,KAAM,KAAMC,GAAI,GAClB,CAAED,KAAM,KAAMC,GAAI,GAClB,CAAED,KAAM,KAAMC,GAAI,GAClB,CAAED,KAAM,OAAQC,GAAI,GACpB,CAAED,KAAM,KAAMC,GAAI,GAClB,CAAED,KAAM,OAAQC,GAAI,GACpB,CAAED,KAAM,OAAQC,GAAI,GACpB,CAAED,KAAM,KAAMC,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AAG,iBAAkB,IACjGE,gCAAoB,IAAI,S,iCC9IhC,MAAMW,EAA2B,IAAgB,EAAQ,CAAC,CAAC,YAAY,qBAExD,gB,6DCPR5E,MAAM,iB,GAIAA,MAAM,e,yJAJjBiD,gCAWM,MAXNlD,EAWM,CAVJmD,yBASc2B,EAAA,CATAC,QAASnC,EAAAmC,QAASC,SAAA,I,CACnBC,SAAQ3B,qBACjB,IAAuD,CAAvDH,yBAAuD+B,EAAA,CAArCjF,MAAM,aAAakF,QAAQ,UAC7C5B,gCAGM,MAHNrD,EAGM,CAFJiD,yBAAmC+B,EAAA,CAAjBC,QAAQ,SAC1BhC,yBAAmC+B,EAAA,CAAjBC,QAAQ,WAE5BhC,yBAAwD+B,EAAA,CAAtCjF,MAAM,eAAekF,QAAQ,W,yDCRvD,MAAMC,EAAS,GAKTP,EAA2B,IAAgBO,EAAQ,CAAC,CAAC,SAASC,GAAQ,CAAC,YAAY,qBAE1E,U,6DCRf,W,6DCAA","file":"assets/js/chunk-01c67a7c.4ce0a008.js","sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, createCommentVNode as _createCommentVNode, createBlock as _createBlock, createTextVNode as _createTextVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-07babb88\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"container\" }\nconst _hoisted_2 = { class: \"types\" }\nconst _hoisted_3 = [\"onClick\"]\nconst _hoisted_4 = { class: \"Product\" }\nconst _hoisted_5 = {\n key: 0,\n class: \"MoreBuyings\"\n}\nconst _hoisted_6 = {\n key: 1,\n class: \"noMore\"\n}\n\nimport { ref, reactive, onMounted, watch } from 'vue'\r\nimport * as Api from '@/utils/api'\r\nimport { useRoute } from 'vue-router'\r\nimport CommodityCard from '@/components/CommodityCard.vue'\r\nimport ProductSkeleton from '@/components/ProductSkeleton.vue'\r\n\r\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'hot_products',\n setup(__props) {\n\r\nconst route = useRoute()\r\nconst ProductList = ref(null)\r\nconst types = [\r\n { name: '全部', id: null },\r\n { name: '女装', id: 1 },\r\n { name: '母婴', id: 2 },\r\n { name: '美妆', id: 3 },\r\n { name: '居家日用', id: 4 },\r\n { name: '鞋品', id: 5 },\r\n { name: '文娱车品', id: 7 },\r\n { name: '数码家电', id: 8 },\r\n { name: '男装', id: 9 },\r\n { name: '内衣', id: 10 },\r\n { name: '箱包', id: 11 },\r\n { name: '配饰', id: 12 },\r\n { name: '户外运动', id: 13 },\r\n { name: '家装家纺', id: 14 },\r\n]\r\n\r\nconst changeType = (id) => {\r\n typeId.value = id\r\n pageNum.value = 1\r\n noMore.value = false\r\n window.scrollTo({ top: 0 })\r\n GetTop100()\r\n}\r\n\r\nconst typeId = ref(1)\r\nconst pageNum = ref(1)\r\nconst pageSize = ref(60)\r\nconst noMore = ref(false)\r\nconst HotsLoding = ref(false)\r\n\r\nconst GetTop100 = () => {\r\n HotsLoding.value = false\r\n Api.Get('grapgoods/api/GetTop100/', {\r\n page: pageNum.value,\r\n pagesize: pageSize.value,\r\n cid: typeId.value,\r\n }).then((res) => {\r\n HotsLoding.value = res.Goods?.length < 60 ? false : true\r\n if (res.Goods?.length < 60) {\r\n noMore.value = true\r\n }\r\n if (pageNum.value == 1) {\r\n ProductList.value = res.Goods\r\n } else {\r\n ProductList.value = ProductList.value.concat(res.Goods)\r\n }\r\n })\r\n}\r\n\r\nonMounted(() => {\r\n typeId.value = route.query?.id || null\r\n GetTop100()\r\n})\r\n\nreturn (_ctx: any,_cache: any) => {\n const _component_el_affix = _resolveComponent(\"el-affix\")!\n const _component_el_button = _resolveComponent(\"el-button\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(_component_el_affix, { offset: 40 }, {\n default: _withCtx(() => [\n _createElementVNode(\"ul\", _hoisted_2, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(types, (type) => {\n return _createElementVNode(\"li\", {\n onClick: ($event: any) => (changeType(type.id)),\n key: type.id,\n class: _normalizeClass({ selectType: typeId.value == type.id })\n }, [\n _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t(type.name)), 1)\n ], 10, _hoisted_3)\n }), 64))\n ])\n ]),\n _: 1\n }),\n _createElementVNode(\"div\", _hoisted_4, [\n (!ProductList.value)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, _renderList(24, (i) => {\n return _createVNode(ProductSkeleton, {\n class: \"CCard\",\n key: i\n })\n }), 64))\n : _createCommentVNode(\"\", true),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(ProductList.value, (Product, index) => {\n return (_openBlock(), _createBlock(CommodityCard, {\n key: Product,\n data: Product,\n index: index,\n height: 290,\n class: \"CCard\"\n }, null, 8, [\"data\", \"index\"]))\n }), 128)),\n (ProductList.value)\n ? (_openBlock(true), _createElementBlock(_Fragment, { key: 1 }, _renderList(6 - (ProductList.value.length % 6), (placeholder) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"placeholderCard\",\n key: placeholder\n }))\n }), 128))\n : _createCommentVNode(\"\", true)\n ]),\n (HotsLoding.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_5, [\n _createVNode(_component_el_button, {\n type: \"danger\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => ((pageNum.value++),GetTop100()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.$t(\"更多\")) + \" ... \", 1)\n ]),\n _: 1\n })\n ]))\n : _createCommentVNode(\"\", true),\n (noMore.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_6, _toDisplayString(_ctx.$t(\"到底啦~看看其他精选内容\")), 1))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})","import script from \"./hot_products.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./hot_products.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./hot_products.vue?vue&type=style&index=0&id=07babb88&scoped=true&lang=scss\"\n\nimport exportComponent from \"F:\\\\store\\\\NewLODAPC\\\\node_modules\\\\vue-loader-v16\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-07babb88\"]])\n\nexport default __exports__","\r\n\r\n\r\n\r\n\r\n","import { render } from \"./ProductSkeleton.vue?vue&type=template&id=9d3d8110&scoped=true\"\nconst script = {}\n\nimport \"./ProductSkeleton.vue?vue&type=style&index=0&id=9d3d8110&scoped=true&lang=scss\"\n\nimport exportComponent from \"F:\\\\store\\\\NewLODAPC\\\\node_modules\\\\vue-loader-v16\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-9d3d8110\"]])\n\nexport default __exports__","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader-v16/dist/index.js??ref--1-1!./hot_products.vue?vue&type=style&index=0&id=07babb88&scoped=true&lang=scss\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader-v16/dist/index.js??ref--1-1!./ProductSkeleton.vue?vue&type=style&index=0&id=9d3d8110&scoped=true&lang=scss\""],"sourceRoot":""}